﻿using FluentNHibernate.Mapping;
using Utility.Persistence_Service_Test.Entities;

namespace Utility.Persistence_Service_Test.Mappings
{
    public class BankkontoMap : ClassMap<Bankkonto>
    {
        public BankkontoMap()
        {
            Id(x => x.Id)
                .GeneratedBy.Identity()
                .Length(11);
            Map(x => x.IBAN)
                .Not.Nullable()
                .Unique();
            References(x => x.Besucher)
                .Cascade.All()
                .Not.LazyLoad();
        }
    }
}
